package com.homework;

public class demo02 {
    public static void main(String[] args) {
        //定义计数器，每行打印5个就换行
        int count = 0;
        //打印四行
        for (int i = 0; i < 4; i++) {
            //打印五列
            for (int j = 0; j < 5; j++) {
                System.out.print("@");
                count++;
            }
            //判断是否每行打印了五个，满足则换行
            if (count % 5 == 0) {
                System.out.println();
            }
        }
    }
}
